cmake_minimum_required(VERSION 3.15)
project(cxi_ftc)
include(../cmake/utils.cmake)
find_package(Qt5 COMPONENTS Core Gui REQUIRED)
find_package(CURL CONFIG)
add_standard_module(${PROJECT_NAME} include/ftc ON ON)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Gui)
target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)
target_link_libraries(${PROJECT_NAME} PUBLIC cxi_common)

copy_imported_dependencies(${PROJECT_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})

# 安装库文件（静态库或动态库）
install(TARGETS ${PROJECT_NAME}
        EXPORT "${PROJECT_NAME}Target"
        ARCHIVE DESTINATION ${PROJECT_NAME}/lib      # *.lib, *.a
        LIBRARY DESTINATION ${PROJECT_NAME}/lib      # *.so, *.dylib
        RUNTIME DESTINATION ${PROJECT_NAME}/bin      # *.dll 或可执行文件
        INCLUDES DESTINATION ${PROJECT_NAME}/include
)
